#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import urllib2
import threading
import Queue


newcsv = open(r'C:\Users\steven.liang\Desktop\result.csv','a+')
csvlines = file(r'C:\Users\steven.liang\Desktop\2.csv').readlines()
                                     

for csvline in csvlines:
    req = csvline.split(',')[1]               
    url = 'http://' + req + '/admin'
    try:
        res = urllib2.urlopen(url)
        if res.msg == 'OK':
            print 'got it', url
        else:
            pass
    except Exception, e:
        pass

    